#!/usr/bin/env bash
 
START_SCRIPT_DIRS=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd ${START_SCRIPT_DIRS}/..
cp ${START_SCRIPT_DIRS}/deploy_configs/Dockerfile ./
 
go env -w GO111MODULE=auto
# go env -w GOPROXY=https://goproxy.cn,direct
go env -w GOPRIVATE="gitlab.spatio-inc.com"
 
go mod tidy
go mod vendor
go build -o main main.go
 
tar -czvf main.tar.gz main configs/* assets/*
